import requests

# get参数
# res = requests.get(url="http://httpbin.org/get?name=qiku&address=东三街")
# print(res.json())

# res = requests.get("http://httpbin.org/get",params={
#     "name": "qiku",
#     "address": "东三街"
# })
# print(res.json())

# res = requests.get("http://httpbin.org/get?name=qiku",params={
#     "address": "东三街"
# })
# print(res.json())

# post参数

# 请求参数类型
# 'Content-Type': 'application/x-www-form-urlencoded'  使用data
# 'Content-Type': 'application/json'  使用json

# res = requests.post(url="http://httpbin.org/post",data={
#     "name":"admin",
#     "password":"123456",
# })
# print(res.json())

res = requests.post(url="http://httpbin.org/post", json={
	"name": "admin",
	"pwd": "123456"
})
print(res.json())










